home *** CD-ROM | disk | FTP | other *** search
- Path: dsi.unimi.it!moreld
- From: moreld@dsi.unimi.it (~ZIO BUDDA~)
- Newsgroups: comp.lang.c++
- Subject: Re: BC++. Pls help me with precompiled headers...
- Date: 26 Feb 1996 11:46:53 GMT
- Organization: Computer Science Dep. - Milan University
- Message-ID: <4gs6jd$2ae@tic.sm.dsi.unimi.it>
- References: <Dn65GG.M19@twisto.eng.hou.compaq.com> <312CC5D7.29F8@wpo.borland.com>
- NNTP-Posting-Host: tac.fddi.dsi.unimi.it
- X-Newsreader: TIN [version 1.2 PL2]
-
- Jeff Jenkins (jjenkins@wpo.borland.com) wrote:
- > jhenell@bangate.eur.compaq.com wrote:
- > >
- > > Using Borland C++ v4.52:
- > >
- > > I get these (for me) rather confusing error messages.
- > >
- > > When compiling I get the following error message:
- > > "Warning LEATHER.CPP 47: Cannot create pre-compiled header: code in
- > > header"
- > > (the 47th line is the constructor of one of the classes,
- > > "Leather::Leather() (" )This^^^^^^^^^^^^^^^^ ctor is a non-inline method. This is, the
- > definition of the function body is going to be generated each time you
- > #include the header-file that contains this definition. That's why you
- > see the errors below: you have #include'd the header file in more than
- > one source module, and therfore forced the compiler to generate multiple
- > definitions. The linker see's all these function definitions and starts
- > to complain because it is confused as which one you want it to use.
-
- > -- jrj
- >
- > > This time it went through the compilation, but not the
- > > Building/Linking:
- > > Linker Error: Leather::Leather() defined in module LEATHER.CPP is
- > > duplicated in module RUBBER.CPP
- > > and this Error is repeated for all methods in the class.
- > > / a newbie feelin' lame & frustrated..
-
- hi, Zio Budda Work For U :
- try to make this :
-
- -------the <Ur include file/the file with the class and funtions of it-------
- #ifndef MYCLASS
- #define MYCLASS
-
- class myclas {
- private :
- int a;
- char c;
-
- public:
- myclass();
- ~myclass();
-
- }
-
- #endif
-
- and now include the file in all file that U want ...
-
- bye bye and sorry for my bad english
- --
- Zio Budda "sempre alla ricerca di un account..." moreld@ghost.dsi.unimi.it
- http://www.dsi.unimi.it/Users/Students/moreld/home.html
- Ask me for questions about LINUX and Games for PC, and see my home page
- I'm a programmer and a consultant...
-
- Tel. 02/2139959 ... Chiedere di Davide Michel
-